package com.adobe.growl.tests
{
	import flexunit.framework.TestCase;
	import com.adobe.growl.Notification;
	import com.adobe.growl.Header;

	public class NotificationTest extends TestCase
	{
		public function NotificationTest(methodName:String=null)
		{
			super(methodName);
		}
		
		public function testName():void
		{
			var n:Notification = new Notification();
			var name:String = "fooName";
			n.name = name;
			
			assertEquals("n.name == name", n.name, name);
		}
		
		public function testTitle():void
		{
			var n:Notification = new Notification();
			var title:String = "fooTitle";
			n.title = title;
			
			assertEquals("n.title == title", n.title, title);
		}		
		
		public function testText():void
		{
			var n:Notification = new Notification();
			var text:String = "fooTest";
			
			n.text = text;
			
			assertEquals("n.text == text", n.text, text);
		}	
		
		public function testSticky():void
		{
			var n:Notification = new Notification();
			var sticky:Boolean = true;
			n.sticky = sticky;
			
			assertEquals("n.sticky == sticky", n.sticky, sticky);
		}			
		
		public function testIconPath():void
		{
			var n:Notification = new Notification();
			var iconPath:String = "fooIconPath";
			
			n.iconPath = iconPath;
			
			assertEquals("n.iconPath == iconPath", n.iconPath, iconPath);
		}			
	
		public function testId():void
		{
			var n:Notification = new Notification();
			
			assertNotNull("n.id != null", n.id);
			assertTrue("n.id.length > 0", (n.id.length > 0));
		}
		
		public function testXHeaders():void
		{
			var n:Notification = new Notification();
			
			var x1:Header = new Header("x-fooName", "fooValue");
			var x2:Header = new Header("x-bamName", "bamValue");
			
			n.xHeaders = [x1, x2];
			
			assertNotNull("n.xHeaders != null", n.xHeaders);
			assertTrue("n.xHeaders.length == 2", (n.xHeaders.length == 2));
		}				
		
	}
}